package org.wdcode.back.po;

import java.io.Serializable;

import org.wdcode.back.helper.BackHelper;

/**
 * 登录日志实体
 * @author WD
 * @since JDK6
 * @version 1.0 2010-03-07
 */
public final class LoginLogs extends BaseBackCreateDateEntityBean implements Serializable {
	// 序列化ID
	private static final long	serialVersionUID	= -7120255100321850349L;

	// 用户ID
	private Integer				userId;
	// 登录IP
	private String				ip;

	/**
	 * 获得用户ID
	 * @return 用户ID
	 */
	public Integer getUserId() {
		return userId;
	}

	/**
	 * 设置用户ID
	 * @param userId 用户ID
	 */
	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	/**
	 * 获得登录IP
	 * @return
	 */
	public String getIp() {
		return ip;
	}

	/**
	 * 设置登录IP
	 * @param ip 登录IP
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}

	/**
	 * 获得显示状态字符串
	 * @return 显示状态字符串
	 */
	public final String getLoginState() {
		return BackHelper.getLoginState().get(getState());
	}
}
